<%--
  Created by IntelliJ IDEA.
  author: Jsonor
  date: 2018/3/20 16:35
  description: Description
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>Title</title>
</head>
<body>
<c:set var="root" value="${pageContext.request.contextPath}"/>
<form action="${root}/app/showByCode">
<input type="text" id="code" name="code" class="textbox" size="20">
<input type="submit" value="搜索"  class="sbttn">
</form>
<a href="${root}/insert.jsp">添加</a>
<table style="width:100%;border:1px white solid">
  <tbody>
  <tr bgcolor="#4F81BD"style="color: #fff;">
    <td>code</td>
    <td>name</td>
    <td>region</td>
    <td>surfaceArea</td>
    <td>indepYear</td>
    <td>population</td>
    <td>lifeExpectancy</td>
    <td>gnp</td>
    <td>headOfState</td>
    <td>capital</td>
    <td>code2</td>
    <td>delete&update</td>
  </tr>

  <c:forEach items="${country}" var="item">
    <tr bgcolor="${status.index%2 == 0?'#D0D8E8':'#E9EDF4'}">
      <td>${item.code}</td>
      <td>${item.name}</td>
      <td>${item.region}</td>
      <td>${item.surfaceArea}</td>
      <td>${item.indepYear}</td>
      <td>${item.population}</td>
      <td>${item.lifeExpectancy}</td>
      <td>${item.gnp}</td>
      <td>${item.headOfState}</td>
      <td>${item.capital}</td>
      <td>${item.code2}</td>
      <td><a href="${root}/app/delete?code=${item.code}">
        <img src="${root}/images/i_del.gif" width="16" height="16" border="0" style="CURSOR: hand"></a>
        <a href="${root}/app/findByCode?code=${item.code}">
          <img src="${root}/images/i_edit.gif" width="16" height="16" border="0" style="CURSOR: hand">
        </a>
      </td>
    </tr>
  </c:forEach>
  </tbody>
</table>
</body>
</html>